QNAYDS ACADEMY

DOCKER AND SPLUNK
INSTALLATION & LOG ANALYSIS

Cyber Security Project Report

Submitted By Muhammed Khan
Project Guide Alen Jolly
Course Certified Penetration Tester (CPT)
Department Cyber Security
Submission Date 05-04-2026
Watch Project Demo LinkedIn GitHub Email

Abstract

This project demonstrates the deployment of a centralized log management solution using Splunk Enterprise and Docker technology. It covers the end-to-end process of installing Docker on a Linux environment, deploying Splunk within a containerized environment, and configuring log file ingestion. The project further explores the practical application of Splunk's Search Processing Language (SPL) to read, analyze, and visualize system logs for cybersecurity monitoring purposes.

Introduction

In the realm of modern cybersecurity, visibility is paramount. Organizations generate massive amounts of machine data daily. Two critical technologies that facilitate the management and analysis of this data are Docker and Splunk.


Docker

Docker is an open-source platform that enables developers to build, deploy, run, update, and manage containers—standardized, executable components that combine application source code with the operating system (OS) libraries and dependencies required to run that code in any environment.


Splunk

Splunk is a powerful platform for searching, monitoring, and analyzing machine-generated big data via a Web-style interface. It captures, indexes, and correlates real-time data in a searchable repository from which it can generate graphs, reports, alerts, dashboards, and visualizations.

Docker Installation

The following steps outline the installation of Docker on an Ubuntu Linux system.

1. Update System Repositories

sudo apt update
sudo apt upgrade -y

2. Install Docker

sudo apt install docker.io -y

3. Start and Enable Docker Service

sudo systemctl start docker
sudo systemctl enable docker
# Verify status
sudo systemctl status docker

Docker Verification Screenshot

Shows output of 'docker --version' and active status

Splunk Installation

1. Download Splunk Enterprise

Download the .deb package from the official Splunk website (requires account creation).

2. Install Package

cd Downloads/
sudo dpkg -i splunk-9.0.0-linux-amd64.deb

3. Start Splunk and Accept License

sudo /opt/splunk/bin/splunk start --accept-license

During this step, you will be prompted to create an administrator username and password.

Splunk Start Screenshot

Shows 'The Splunk web interface is available at http://hostname:8000'

Docker + Splunk Integration

Running Splunk inside a Docker container is a cleaner, more efficient method for testing and development environments.

1. Pull Splunk Image

sudo docker pull splunk/splunk:latest

2. Run Splunk Container

sudo docker run -d -p 8000:8000 -e "SPLUNK_START_ARGS=--accept-license" -e "SPLUNK_PASSWORD=password123" --name splunk splunk/splunk:latest

This command maps port 8000 (Web UI) and sets the admin password.

Container Status Screenshot

Output of 'docker ps' showing running Splunk container

Log File Saving

To analyze data, we must first ingest logs into Splunk. We configured Splunk to monitor a specific local directory.

1. Access Web Interface

Open browser and navigate to http://localhost:8000. Login with created credentials.

2. Add Data Input

  • Go to Settings > Add Data.
  • Select Monitor > Files & Directories.
  • Browse and select the system log file: /var/log/syslog (or any target log file).

3. Configure Source Type

Splunk automatically detects the format, but for custom logs, we can define line breaking and timestamps in props.conf.

Data Input Configuration

Screenshot of Splunk Web UI 'Add Data' wizard

Log File Reading & Analysis

Once data is indexed, we use the Search & Reporting app to query the logs.

1. Basic Search

SPL Query
index="main" source="/var/log/syslog" | head 20

2. Filtering for Errors

Finding failed login attempts or error messages:

SPL Query
index="main" "error" OR "failed" | stats count by _time

3. Visualization

We created a dashboard panel to visualize the frequency of log events over time.

Splunk Dashboard Screenshot

Visual representation of log analysis results

Conclusion

This project successfully demonstrated the deployment of a robust log management infrastructure using Docker and Splunk. By containerizing the Splunk instance, we achieved a portable and isolated environment suitable for security testing. The successful ingestion and querying of log files prove the efficacy of this setup for identifying security incidents and operational issues within a network environment.

References